public class Test02 {
    //https://leetcode.cn/problems/missing-number/
    public int missingNumber(int[] nums) {
        int ret = 0;
        for(int num:nums) ret ^= num;
        for(int i =  0 ; i < nums.length+ 1 ; i++){
            ret ^= i;
        }
        return ret;
    }
}
